package observable;

/**
 * create by yongli on 2021-07-04 14:22
 */

class Door {
    boolean state;

    public boolean isState() {
        if (state == true) {
            System.out.println("the door opened");
        } else {
            System.out.println("the door close");
        }
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }
}
